This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-31
lines changed Expand file tree Collapse file tree 4 files changed +9
-31
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ pip install -e ".[lint,mypy]"
24
24
functionality) with:
25
25
26
26
``` sh
27
- black . --exclude= " \.tox|build|env "
27
+ black .
28
28
```
29
29
30
30
- ** flake8**
@@ -35,7 +35,7 @@ pip install -e ".[lint,mypy]"
35
35
Check all application and test code with:
36
36
37
37
` ` ` sh
38
- flake8 synapse tests
38
+ flake8 .
39
39
` ` `
40
40
41
41
- ** isort**
@@ -46,11 +46,9 @@ pip install -e ".[lint,mypy]"
46
46
Auto-fix imports with:
47
47
48
48
` ` ` sh
49
- isort -rc synapse tests
49
+ isort .
50
50
` ` `
51
51
52
- ` -rc` means to recursively search the given directories.
53
-
54
52
It' s worth noting that modern IDEs and text editors can run these tools
55
53
automatically on save. It may be worth looking into whether this
56
54
functionality is supported in your editor for a more convenient
Original file line number Diff line number Diff line change 36
36
37
37
[tool .black ]
38
38
target-version = [' py37' , ' py38' , ' py39' , ' py310' ]
39
- exclude = '''
40
-
41
- (
42
- /(
43
- \.eggs # exclude a few common directories in the
44
- | \.git # root of the project
45
- | \.tox
46
- | \.venv
47
- | \.env
48
- | env
49
- | _build
50
- | _trial_temp.*
51
- | build
52
- | dist
53
- | debian
54
- )/
55
- )
56
- '''
39
+ # black ignores everything in .gitignore by default, see
40
+ # https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
41
+ # Use `extend-exclude` if you want to exclude something in addition to this.
57
42
58
43
[tool .isort ]
59
44
line_length = 88
@@ -65,6 +50,7 @@ known_twisted = ["twisted", "OpenSSL"]
65
50
multi_line_output = 3
66
51
include_trailing_comma = true
67
52
combine_as_imports = true
53
+ skip_gitignore = true
68
54
69
55
[tool .poetry ]
70
56
name = " matrix-synapse"
Original file line number Diff line number Diff line change 80
80
# then lint everything!
81
81
if [[ -z ${files+x} ]]; then
82
82
# Lint all source code files and directories
83
- # Note: this list aims to mirror the one in tox.ini
84
- files=(
85
- " synapse" " docker" " tests"
86
- # annoyingly, black doesn't find these so we have to list them
87
- " scripts-dev"
88
- " contrib" " setup.py" " synmark" " stubs" " .ci"
89
- )
83
+ files=( " ." )
90
84
fi
91
85
fi
92
86
Original file line number Diff line number Diff line change 33
33
pip>=10
34
34
35
35
# directories/files we run the linters on.
36
- # if you update this list, make sure to do the same in scripts-dev/lint.sh
36
+ # TODO: this is now out of date; we will remove as part of poetry migration.
37
37
lint_targets =
38
38
setup.py
39
39
synapse
You can’t perform that action at this time.
0 commit comments