Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 736201c

Browse files
D. J.:
- Moved from black, flake8 and isort to ruff - Fixed linting errors
1 parent 1df3b36 commit 736201c

File tree

47 files changed

+61
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+61
-62
lines changed

‎.github/workflows/check-format.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
run: |
3030
uv pip install -r pyproject.toml
3131
uv pip install --group dev
32-
- name: Check Format with flake8
32+
- name: Check Format with ruff
3333
run: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
flake8 --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics
36-
# exit-zero treats all errors as warnings. Black has 88 max-line-length
37-
flake8 --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
34+
ruff check .

‎awesome_python_leetcode/_101_symmetric_tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_104_maximum_depth_of_binary_tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_105_construct_binary_tree_from_preorder_and_inorder_traversal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import List, Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_106_construct_binary_tree_from_inorder_and_postorder_traversal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import List, Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_112_path_sum.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_114_flatten_binary_tree_to_linked_list.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_123_best_time_to_buy_and_sell_stock_III.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def maxProfit(self, prices: List[int]) -> int:
1717
"""
1818
dp = [0 for _ in range(len(prices))]
1919

20-
for t in range(1, 3):
20+
for _ in range(1, 3):
2121
pos = -prices[0]
2222
profit = 0
2323
for i in range(1, len(prices)):

‎awesome_python_leetcode/_129_sum_root_to_leaf_numbers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Optional
22

3-
43
from awesome_python_leetcode.tree import TreeNode
54

65

‎awesome_python_leetcode/_133_clone_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import collections
2-
from typing import List, Optional, Dict
2+
from typing import Dict, List, Optional
33

44

55
class Node:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /