Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Self type in Method Signatures #3705

Merged
merged 84 commits into from
Mar 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
4355dec
add some Self type annotations
DanielYang59 Mar 24, 2024
7130241
add more Self and type annotations
DanielYang59 Mar 24, 2024
b7cc248
add more Self and type annotations
DanielYang59 Mar 24, 2024
a467a2e
pre-commit auto-fixes
pre-commit-ci[bot] Mar 24, 2024
ae6f09a
add more Self and type annotations
DanielYang59 Mar 24, 2024
4fb2035
Merge branch 'use-self-type' of github.com:DanielYang59/pymatgen into…
DanielYang59 Mar 24, 2024
e0c1366
format docstring to google style
DanielYang59 Mar 24, 2024
cc49d0b
add more Self types
DanielYang59 Mar 24, 2024
1938cb9
TEMP FIX for normalized repr
DanielYang59 Mar 24, 2024
2e7921f
add more Self types
DanielYang59 Mar 24, 2024
b06bc89
remove encoding for binary
DanielYang59 Mar 24, 2024
48a8fd5
use `Attributes` over `Parameters`
DanielYang59 Mar 24, 2024
2adde29
add Self return type to __new__ and __enter__ methods
janosh Mar 24, 2024
296fe08
use `Self` for multi-line def
DanielYang59 Mar 24, 2024
5994121
Merge branch 'use-self-type' of https://github.com/DanielYang59/pymat…
DanielYang59 Mar 24, 2024
5b58fbc
`mypy` fixes in core
DanielYang59 Mar 24, 2024
13dbbd9
`mypy` fixes in core
DanielYang59 Mar 24, 2024
949af29
move `mypy` fixes
DanielYang59 Mar 24, 2024
0eda046
Merge branch 'master' into use-self-type
DanielYang59 Mar 24, 2024
bd08e71
add Note tag
DanielYang59 Mar 24, 2024
91ae376
Merge branch 'use-self-type' of https://github.com/DanielYang59/pymat…
DanielYang59 Mar 24, 2024
11a53c4
remove unused arg properties from core.ion
DanielYang59 Mar 24, 2024
493bc75
fix mypy error
DanielYang59 Mar 24, 2024
0aba332
fix unit test for reaction energy calc
DanielYang59 Mar 24, 2024
47a7c22
fix unit test for core.units
DanielYang59 Mar 24, 2024
6a705d2
remove ERROR = UnitError
DanielYang59 Mar 24, 2024
ea76e15
google-style doc string return type format
janosh Mar 24, 2024
b528903
replace deprecated utcnow
DanielYang59 Mar 25, 2024
86a2d9f
fix missing datetime import
DanielYang59 Mar 25, 2024
fa05c87
replace `app = lines.append`
DanielYang59 Mar 25, 2024
6d789e5
slab type hints
janosh Mar 25, 2024
e8b6eb7
relocate Slab import
DanielYang59 Mar 25, 2024
df224a9
fix vector in adsorption
DanielYang59 Mar 25, 2024
b12eadb
Merge branch 'master' into use-self-type
DanielYang59 Mar 25, 2024
1263036
use time for time count
DanielYang59 Mar 25, 2024
5a75503
revert datetime utc
DanielYang59 Mar 25, 2024
7df2bfe
switch to `time`
DanielYang59 Mar 25, 2024
bd72454
switch to `datetime` for utc time for now
DanielYang59 Mar 25, 2024
b8f1a32
Merge branch 'master' into pr/DanielYang59/3705
janosh Mar 25, 2024
da7fded
take some coderabbitai suggestions
DanielYang59 Mar 26, 2024
1595cf2
ignore some mypy override errors
DanielYang59 Mar 26, 2024
3381b53
Merge branch 'master' into use-self-type
DanielYang59 Mar 26, 2024
6f397bb
Merge branch 'master' into use-self-type
DanielYang59 Mar 26, 2024
f96ccfb
fix type ufloat
DanielYang59 Mar 26, 2024
8583e39
fix BaseLammpsGenerator missing fields inputfile and data (did this a…
janosh Mar 27, 2024
42ade92
Merge branch 'master' into pr/DanielYang59/3705
janosh Mar 27, 2024
3bb711d
`mypy` fixes
DanielYang59 Mar 27, 2024
48abd6f
`mypy` fixes
DanielYang59 Mar 27, 2024
5923a55
more `mypy` fixes
DanielYang59 Mar 27, 2024
bc47741
mypy fixes
janosh Mar 27, 2024
7b82274
fix unit test
DanielYang59 Mar 27, 2024
1d11b0e
fix unit test
DanielYang59 Mar 27, 2024
6973596
reapply fix for voronoi
DanielYang59 Mar 27, 2024
1a9878d
fix mypy and voronoi unit test
DanielYang59 Mar 27, 2024
d8f4877
fix unit test for voronoi
DanielYang59 Mar 27, 2024
8e10c9d
more `mypy` fixes
DanielYang59 Mar 27, 2024
13e1eed
one more `mypy` fix
DanielYang59 Mar 27, 2024
d69e1ad
pre-commit auto-fixes
pre-commit-ci[bot] Mar 27, 2024
f9a0b65
fix number import name
DanielYang59 Mar 27, 2024
2d5e0bb
fix lammps generator
DanielYang59 Mar 27, 2024
5d88bc3
avoid self type hard-coding
DanielYang59 Mar 27, 2024
934934a
mypy fix
DanielYang59 Mar 28, 2024
cf16f8b
`sourcery` fix
DanielYang59 Mar 28, 2024
4d76b1f
Merge branch 'master' into use-self-type
DanielYang59 Mar 28, 2024
5cd6072
`sourcery` fix
DanielYang59 Mar 28, 2024
3efde4c
Merge branch 'use-self-type' of github.com:DanielYang59/pymatgen into…
DanielYang59 Mar 28, 2024
8cdbed9
`sourcery` fix
DanielYang59 Mar 28, 2024
fdf428d
`mypy` fix
DanielYang59 Mar 28, 2024
b0d63cd
suppress `mypy` error
DanielYang59 Mar 28, 2024
96f285a
`mypy` and `sourcery` fix
DanielYang59 Mar 28, 2024
3b293bf
`mypy` fixes
DanielYang59 Mar 28, 2024
7312432
fix unit tests
DanielYang59 Mar 28, 2024
7e426bd
`mypy` fixes
DanielYang59 Mar 28, 2024
f9107fb
`mypy` fixes
DanielYang59 Mar 28, 2024
fb49e75
suppress `mypy` error in xcfunc
DanielYang59 Mar 28, 2024
5e22d01
fix `mypy` error
DanielYang59 Mar 28, 2024
cfd77ab
fix `mypy` error
DanielYang59 Mar 28, 2024
a1e8eb0
refactor date parsing in AirssProvider to use std lib datetime instea…
janosh Mar 29, 2024
8137931
fix TestKpoints check kpts_shift
janosh Mar 29, 2024
4bbee19
fix mypy error in sets.py: cast(Sequence[Sequence[float]], kpoints)
janosh Mar 29, 2024
8bdb484
refactor
janosh Mar 29, 2024
6d06bef
fix mypy confusing keyword and positional args in Lattice.from_parame…
janosh Mar 29, 2024
5c309e3
remove now unused mypy ignore in Cssr.from_str
janosh Mar 29, 2024
2fe3b93
fix bad refactor in 8bdb4845fd
janosh Mar 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pre-commit auto-fixes
pre-commit-ci[bot] committed Mar 24, 2024
commit a467a2eaeafa346cc3b5061d561cf7535732de4c
2 changes: 1 addition & 1 deletion pymatgen/core/ion.py
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ class Ion(Composition, MSONable, Stringify):
Mn[+2]. Note the order of the sign and magnitude in each representation.
"""

def __init__(self, composition: Composition, charge: float=0.0, _properties=None) -> None:
def __init__(self, composition: Composition, charge: float = 0.0, _properties=None) -> None:
"""Flexible Ion construction, similar to Composition.
For more information, please see pymatgen.core.Composition.
"""