Skip to content

Commit

Permalink
Merge pull request #311 from bellshade/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
kayabaakihiko13 committed Jan 30, 2024
2 parents 6039b42 + e4fe35e commit 5974c07
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: auto-walrus

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand Down
1 change: 0 additions & 1 deletion Basic/04_operator/operator_penugasan_ekspresi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
+------------+--------------+-----------------+
"""


# Contoh dibawah ini dapat dilihat perbedaannya jika melalui CLI Python
# Tidak akan mengembalikan nilai, hanya melakukan pengisian
# walrus = False
Expand Down
1 change: 0 additions & 1 deletion algorithm/arithmetic_analysis/in_static_equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Memeriksa apakah sistem gaya berada dalam kesetimbangan statis.
"""


from numpy import array, cos, cross, ndarray, radians, sin


Expand Down
8 changes: 5 additions & 3 deletions algorithm/matrix/matrix_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ def cofactors(self):
return Matrix(
[
[
self.minors().rows[row][column]
if (row + column) % 2 == 0
else self.minors().rows[row][column] * -1
(
self.minors().rows[row][column]
if (row + column) % 2 == 0
else self.minors().rows[row][column] * -1
)
for column in range(self.minors().num_columns)
]
for row in range(self.minors().num_rows)
Expand Down
6 changes: 2 additions & 4 deletions algorithm/searching/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
@runtime_checkable
class SizedIndexable(Iterable[T], Protocol[T]):
@overload
def __getitem__(self, key: slice) -> SizedIndexable[T]:
...
def __getitem__(self, key: slice) -> SizedIndexable[T]: ...

def __len__(self) -> int:
...
def __len__(self) -> int: ...
7 changes: 3 additions & 4 deletions algorithm/searching/binary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
https://en.wikipedia.org/wiki/Binary_search_algorithm
"""

from __future__ import annotations

from typing import Any, Protocol, TypeVar
Expand All @@ -33,14 +34,12 @@


class Comparable(Protocol):
def __lt__(self, other: Any) -> bool:
...
def __lt__(self, other: Any) -> bool: ...

def __le__(self, other: Any) -> bool:
"""Hanya untuk suppress LGTM alert."""

def __gt__(self, other: Any) -> bool:
...
def __gt__(self, other: Any) -> bool: ...

def __ge__(self, other: Any) -> bool:
"""Hanya untuk suppress LGTM alert."""
Expand Down
1 change: 1 addition & 0 deletions algorithm/searching/linear_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
https://en.wikipedia.org/wiki/Linear_search
"""

from __future__ import annotations

from typing import TypeVar
Expand Down
1 change: 1 addition & 0 deletions implementation/artificial_intelligence/random_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Pendekatan ansambel ini membantu meningkatkan akurasi dan ketahanan model
secara keseluruhan.
"""

import numpy as np
from typing import Union

Expand Down
1 change: 1 addition & 0 deletions implementation/chiper/hill_chiper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
panjang teks mencapai kelipatan dari break_key. Jadi teks setelah
dekripsi mungkin sedikit berbeda dari teks aslinya.
"""

import string

import numpy
Expand Down
4 changes: 1 addition & 3 deletions implementation/physics/n_body_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ def update_system(self, delta_time: float) -> None:
dif_x = body2.position_x - body1.position_x
dif_y = body2.position_y - body1.position_y

distance = (dif_x**2 + dif_y**2 + self.softening_factor) ** (
1 / 2
)
distance = (dif_x**2 + dif_y**2 + self.softening_factor) ** (1 / 2)
force_x += (
self.gravitation_constant * body2.mass * dif_x / distance**3
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class BinaryTreePathSum:
>>> BinaryTreePathSum().path_sum(tree, 8)
2
"""

target: int

def __init__(self) -> None:
Expand Down

0 comments on commit 5974c07

Please sign in to comment.