Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#59)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.272 → v0.0.275](astral-sh/ruff-pre-commit@v0.0.272...v0.0.275)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](pre-commit/mirrors-mypy@v1.3.0...v1.4.1)

* noqa: PLR0124

* Update set_theory.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
  • Loading branch information
pre-commit-ci[bot] and cclauss authored Jun 27, 2023
1 parent 67652e3 commit 2ac1f50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ repos:
args:
- --quiet-level=2
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
rev: v0.0.275
hooks:
- id: ruff
args:
- --select=A,B,C,E,F,I,PL,RUF,UP,W
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.4.1
hooks:
- id: mypy
# By default, mypy will run with mypy --ignore-missing-imports,
Expand Down
16 changes: 10 additions & 6 deletions set_theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@ def set_theory(abc, ac, cde):
print(f"Set difference: abc - cde --> {sorted(abc - cde)}")
print(f"Symmetric difference: abc ^ cde --> {sorted(abc ^ cde)}")
print(
f"Is suubset: ac <= abc, abc <= abc --> {ac <= abc}, {abc <= abc}",
"Is subset: ac <= abc, abc <= abc --> "
f"{ac <= abc}, {abc <= abc}" # noqa: PLR0124
)
print(
f"Is superset: abc >= ac, abc >= abc --> {abc >= ac}, {abc >= abc}",
"Is superset: abc >= ac, abc >= abc --> "
f"{abc >= ac}, {abc >= abc}" # noqa: PLR0124
)
print(
f"Is proper suubset: ac < abc, abc < abc --> {ac < abc}, {abc < abc}",
"Is proper subset: ac < abc, abc < abc --> "
f"{ac < abc}, {abc < abc}" # noqa: PLR0124
)
print(
f"Is proper superset: abc > ac, abc > abc --> {abc > ac}, {abc > abc}",
"Is proper superset: abc > ac, abc > abc --> "
f"{abc > ac}, {abc > abc}", # noqa: PLR0124
)


Expand All @@ -33,8 +37,8 @@ def set_theory(abc, ac, cde):
Intersection: abc & cde --> ['c']
Set difference: abc - cde --> ['a', 'b']
Symmetric difference: abc ^ cde --> ['a', 'b', 'd', 'e']
Is suubset: ac <= abc, abc <= abc --> True, True
Is subset: ac <= abc, abc <= abc --> True, True
Is superset: abc >= ac, abc >= abc --> True, True
Is proper suubset: ac < abc, abc < abc --> True, False
Is proper subset: ac < abc, abc < abc --> True, False
Is proper superset: abc > ac, abc > abc --> True, False
"""

0 comments on commit 2ac1f50

Please sign in to comment.