Add pyupgrade to pre-commit (#5638) · coderjack/algorithms-in-python@477cc3f · GitHub
Skip to content

Commit 477cc3f

Browse files
cclaussgithub-actions
andauthored
Add pyupgrade to pre-commit (TheAlgorithms#5638)
* Add pyupgrade to pre-commit * Remove unused imports * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 70368a7 commit 477cc3f

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions

DIRECTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
* [Molecular Chemistry](https://github.com/TheAlgorithms/Python/blob/master/conversions/molecular_chemistry.py)
127127
* [Octal To Decimal](https://github.com/TheAlgorithms/Python/blob/master/conversions/octal_to_decimal.py)
128128
* [Prefix Conversions](https://github.com/TheAlgorithms/Python/blob/master/conversions/prefix_conversions.py)
129+
* [Pressure Conversions](https://github.com/TheAlgorithms/Python/blob/master/conversions/pressure_conversions.py)
129130
* [Rgb Hsv Conversion](https://github.com/TheAlgorithms/Python/blob/master/conversions/rgb_hsv_conversion.py)
130131
* [Roman Numerals](https://github.com/TheAlgorithms/Python/blob/master/conversions/roman_numerals.py)
131132
* [Temperature Conversions](https://github.com/TheAlgorithms/Python/blob/master/conversions/temperature_conversions.py)
@@ -860,6 +861,8 @@
860861
* [Sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_301/sol1.py)
861862
* Problem 551
862863
* [Sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_551/sol1.py)
864+
* Problem 686
865+
* [Sol1](https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_686/sol1.py)
863866

864867
## Quantum
865868
* [Deutsch Jozsa](https://github.com/TheAlgorithms/Python/blob/master/quantum/deutsch_jozsa.py)

data_structures/binary_tree/merge_two_binary_trees.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"""
88
from __future__ import annotations
99

10-
from typing import Optional
11-
1210

1311
class Node:
1412
"""
@@ -21,7 +19,7 @@ def __init__(self, value: int = 0) -> None:
2119
self.right: Node | None = None
2220

2321

24-
def merge_two_binary_trees(tree1: Node | None, tree2: Node | None) -> Optional[Node]:
22+
def merge_two_binary_trees(tree1: Node | None, tree2: Node | None) -> Node | None:
2523
"""
2624
Returns root node of the merged tree.
2725

data_structures/linked_list/skip_list.py

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)