Skip to content

Commit

Permalink
Warn on unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Dec 18, 2024
1 parent 6664be2 commit 7e50077
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
10 changes: 3 additions & 7 deletions artisatomic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,7 @@ def process_files(ion_handlers: list[tuple[int, list[int | tuple[int, str]]]], a
photoionization_crosssections[i],
photoionization_targetfractions[i],
photoionization_thresholds_ev[i],
) = match_hydrogenic_phixs(
atomic_number, ion_stage, energy_levels[i], ionization_energy_ev[i], handler, args, flog
)
) = match_hydrogenic_phixs(atomic_number, energy_levels[i], ionization_energy_ev[i], handler, args)

dftransitions_allions = [pl.DataFrame(t) if not isinstance(t, pl.DataFrame) else t for t in transitions]
write_output_files(
Expand Down Expand Up @@ -879,9 +877,7 @@ def get_nist_ionization_energies_ev() -> dict[tuple[int, int], float]:
return dictioniz


def match_hydrogenic_phixs(
atomic_number: int, ion_stage: int, energy_levels, ionization_energy_ev: float, ion_handler: str, args, flog
):
def match_hydrogenic_phixs(atomic_number: int, energy_levels, ionization_energy_ev: float, ion_handler: str, args):
dict_get_n_func = {
"tanakajplt": readtanakajpltdata.get_level_valence_n,
"carsus": readcarsusdata.get_level_valence_n,
Expand Down Expand Up @@ -1600,7 +1596,7 @@ def write_output_files(
)
else:
photoionization_targetfractions[i] = readhillierdata.get_photoiontargetfractions(
energy_levels[i], energy_levels[i + 1], hillier_photoion_targetconfigs[i], flog
energy_levels[i], energy_levels[i + 1], hillier_photoion_targetconfigs[i]
)

with open(os.path.join(args.output_folder, "phixsdata_v2.txt"), "a") as fphixs:
Expand Down
4 changes: 2 additions & 2 deletions artisatomic/readhillierdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def get_opproject_phixstable(lambda_angstrom, a, b, c, d, e):
# only applies to helium
# the threshold cross sections seems ok, but energy dependence could be slightly wrong
# what is the h parameter that is not used??
def get_hummer_phixstable(lambda_angstrom, a, b, c, d, e, f, g, h):
def get_hummer_phixstable(lambda_angstrom, a, b, c, d, e, f, g, h): # noqa: ARG001
energygrid = np.arange(0, 1.0, 0.001)
phixstable = np.empty((len(energygrid), 2))

Expand Down Expand Up @@ -1161,7 +1161,7 @@ def read_coldata(atomic_number, ion_stage, energy_levels, flog, args):
return upsilondict


def get_photoiontargetfractions(energy_levels, energy_levels_upperion, hillier_photoion_targetconfigs, flog):
def get_photoiontargetfractions(energy_levels, energy_levels_upperion, hillier_photoion_targetconfigs):
targetlist = [[] for _ in energy_levels]
targetlist_of_targetconfig = defaultdict(list)

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ extend-exclude = ["_version.py"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ARG001", # ignored because variables in df.eval() are not detected
"ANN001", # missing-type-function-argument
"ANN201", # missing-return-type-undocumented-public-function
"ANN204",
Expand Down

0 comments on commit 7e50077

Please sign in to comment.