Skip to content

Commit

Permalink
enable pycodestyle rules
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Sep 26, 2023
1 parent 70302d2 commit b4ffcb2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ target-version = "py38"
line-length = 120
select = [
# minimal set to match pre-ruff behavior
#"E", # pycodestyle
"E", # pycodestyle
"F", # pyflakes, autoflake
"I", # isort
"S", # bandit
Expand Down
4 changes: 2 additions & 2 deletions sphinx_asdf/asdf2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def run(self):
cwd = os.getcwd()
os.chdir(TMPDIR)

show_header = not ("no_header" in self.arguments)
show_bocks = not ("no_blocks" in self.arguments)
show_header = "no_header" not in self.arguments
show_bocks = "no_blocks" not in self.arguments

parts = []
try:
Expand Down
2 changes: 1 addition & 1 deletion sphinx_asdf/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def _process_validation_keywords(self, schema, typename=None, path=""):
text = f"Maximum length: {schema['maxItems']}"
node_list.append(nodes.line(text=text))
if "additionalItems" in schema and "items" in schema:
if isinstance(schema["items"], list) and schema["additionalItems"] == False:
if isinstance(schema["items"], list) and schema["additionalItems"] is False:
node_list.append(nodes.emphasis(text="Additional items not permitted"))
elif not ("minItems" in schema or "maxItems" in schema):
node_list.append(nodes.emphasis(text="No length restriction"))
Expand Down

0 comments on commit b4ffcb2

Please sign in to comment.