Performed a full code review of the neat-python codebase, scanning all core modules for defects, typos, stale comments, and quality issues. Identified 11 issues total; fixed 5 in this session.
Three raise RuntimeError(...) calls in FloatAttribute.validate, IntegerAttribute.validate, and BoolAttribute.validate were plain strings instead of f-strings, so error messages would print the literal text {self.name} instead of the attribute name.
neat/attributes.py:89— FloatAttributeneat/attributes.py:133— IntegerAttributeneat/attributes.py:177— BoolAttribute
_get_neat_version() had a hardcoded fallback of "1.1.0" but the project version is 2.0.0. Also used a bare except: clause which catches SystemExit, KeyboardInterrupt, etc. Changed fallback to "2.0.0" and narrowed to except Exception:.
All four exporter functions (export_feedforward, export_recurrent, export_ctrnn, export_iznn) used datetime.utcnow().isoformat() + "Z" which is deprecated since Python 3.12. Replaced with datetime.now(timezone.utc).isoformat() which produces a timezone-aware ISO 8601 string with +00:00 suffix.
Removed # pylint: disable=no-self-use comments from two locations. The no-self-use check was removed from pylint in version 2.14.
neat/reporting.py:131— StdOutReporter.post_evaluateneat/iznn/__init__.py:150— IZNN.get_time_step_msec
- Destructive pickling side effects —
DefaultGenomeConfig.__getstate__andDefaultSpeciesSet.__getstate__callnext()onitertools.countobjects, advancing the counter on the original object. - FeedForwardNetwork.create mutates genome — Writing to
cg.weightwhenrandom_valuesorunique_valueis set corrupts the genome. Alsoif unique_value:is falsy for 0.0. - best_genome tracking ignores fitness_criterion — Always uses
>even whenfitness_criterion = min. - fitness_criterion attribute may not be set — When
no_fitness_termination=Trueand criterion is not max/min/mean. - Dead None check in stagnation.py:56 —
prev_fitnesscan never be None. - Weaker connection filter in RecurrentNetwork/CTRNN — Should match the stricter filter used by IZNN.
neat/attributes.pyneat/export/exporters.pyneat/reporting.pyneat/iznn/__init__.py
Zenodo issued DOI 10.5281/zenodo.19024753 for the project. Updated all citation-related files to include it:
CITATION.cff— Addedrepository-code,license,version(2.0.1), anddoifields.README.md— Added Zenodo DOI badge, DOI URL in APA entry,version/doi/urlin BibTeX entry.docs/faq.rst— Replaced old@misccitation with@softwareentry including DOI, version, and URL. Updated in-text example from "CodeReclaimers" to "McIntyre et al., 2026".docs/academic_research.rst— Replaced bare GitHub link with full APA citation including DOI.
CITATION.cffREADME.mddocs/faq.rstdocs/academic_research.rst