Skip to content

Commit

Permalink
Don't allow a space between the variable name and the colon introduci…
Browse files Browse the repository at this point in the history
…ng the type.
  • Loading branch information
tonyandrewmeyer committed Sep 22, 2023
1 parent d181f8a commit 47a66b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ show_missing = true
# Formatting tools configuration
[tool.autopep8]
max-line-length = 99
ignore = ["E203", "W503"]
ignore = ["W503"]
recursive = true
jobs = -1
aggressive = 3
Expand All @@ -22,7 +22,7 @@ max-line-length = 99
max-doc-length = 99
exclude = [".git", "__pycache__", ".tox", "build", "dist", "*.egg_info", "venv"]
select = ["E", "W", "F", "C", "N", "R", "D", "H"]
ignore = ["D105", "D107", "E203", "W503"]
ignore = ["D105", "D107", "W503"]
# D100, D101, D102, D103, D104: Ignore missing docstrings in tests
per-file-ignores = ["test/*:D100,D101,D102,D103,D104"]
docstring-convention = "google"
Expand Down
8 changes: 4 additions & 4 deletions test/test_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class InfrastructureTests(unittest.TestCase):

def test_quote_backslashes(self):
# ensure we're not using unneeded backslash to escape strings
issues : typing.List[typing.Tuple[str, int, str]] = []
issues: typing.List[typing.Tuple[str, int, str]] = []
for filepath in get_python_filepaths():
with open(filepath, "rt", encoding="utf8") as fh:
for idx, line in enumerate(fh, 1):
Expand All @@ -55,7 +55,7 @@ def test_quote_backslashes(self):

def test_ensure_copyright(self):
# all non-empty Python files must have a proper copyright somewhere in the first 5 lines
issues : typing.List[str] = []
issues: typing.List[str] = []
regex = re.compile(r"# Copyright \d\d\d\d(-\d\d\d\d)? Canonical Ltd.\n")
for filepath in get_python_filepaths():
if os.stat(filepath).st_size == 0:
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_install_requires(self):

# For some reason "setup.py --requires" doesn't work, so do this the hard way
with open('setup.py', encoding='utf-8') as f:
lines : typing.List[str] = []
lines: typing.List[str] = []
for line in f:
if 'install_requires=[' in line:
break
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_imports(self):
with self.subTest(name=name):
self.check(name)

def check(self, name : str):
def check(self, name: str):
"""Helper function to run the test."""
fd, testfile = tempfile.mkstemp()
self.addCleanup(os.unlink, testfile)
Expand Down

0 comments on commit 47a66b1

Please sign in to comment.