Skip to content

Commit

Permalink
fix: revert ruff changes
Browse files Browse the repository at this point in the history
Looks like we need some work to upgrade ruff past 0.4.
  • Loading branch information
scanny committed Dec 14, 2024
1 parent 71d374c commit 286a5ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@ verboseOutput = true

[tool.ruff]
line-length = 100
target-version = "py39"

[tool.ruff.lint]
# -- changes made here should also be made in `.pre-commit-config.yaml` and `Makefile` --
ignore = [
"COM812", # -- over aggressively insists on trailing commas where not desireable --
"PT001", # -- wants empty parens on @pytest.fixture where not used (essentially always) --
"PT011", # -- pytest.raises({exc}) too broad, use match param or more specific exception --
"PT012", # -- pytest.raises() block should contain a single simple statement --
"SIM117", # -- merge `with` statements for context managers that have same scope --
]
select = [
lint.select = [
"C4", # -- flake8-comprehensions --
"COM", # -- flake8-commas --
"E", # -- pycodestyle errors --
Expand All @@ -38,3 +29,11 @@ select = [
"UP034", # -- Avoid extraneous parentheses --
"W", # -- Warnings, including invalid escape-sequence --
]
lint.ignore = [
"COM812", # -- over aggressively insists on trailing commas where not desireable --
"PT001", # -- wants empty parens on @pytest.fixture where not used (essentially always) --
"PT005", # -- flags mock fixtures with names intentionally matching private method name --
"PT011", # -- pytest.raises({exc}) too broad, use match param or more specific exception --
"PT012", # -- pytest.raises() block should contain a single simple statement --
"SIM117", # -- merge `with` statements for context managers that have same scope --
]
2 changes: 1 addition & 1 deletion unstructured/file_utils/filetype.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def file_type(cls, ctx: _FileTypeDetectionContext) -> FileType:
@property
def _file_type(self) -> FileType:
"""FileType member corresponding to this document source."""
# -- An explicit content-type most commonly asserted by the client/SDK and is therefore
# -- An explicit content-type is most commonly asserted by the client/SDK and is therefore
# -- inherently unreliable. On the other hand, binary file-types can be detected with 100%
# -- accuracy. So start with binary types and only then consider an asserted content-type,
# -- generally as a last resort.
Expand Down

0 comments on commit 286a5ac

Please sign in to comment.