Skip to content

Commit 5c3f171

Browse files
Avoid bug running python 3.08
1 parent a1c8344 commit 5c3f171

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pySubnetSB is installed using
2828
https://github.com/ModelEngineering/pySubnetSB/blob/main/examples/api_basics.ipynb is a Jupyter notebook that demonstrates pySubsetSB capabilities.
2929

3030
# Version History
31-
* 1.0.4 7/18/2025 Fix install issues with missing modules
31+
* 1.0.5 7/19/2025 Fix install issues with missing modules
3232
* 1.0.2 4/10/2025. ModelSpecification API accepts many kinds of model inputs, Antimony, SBML, roadrunner.
3333
* 1.0.1 4/09/2025. Improved generation of networks with subnets. Use "mapping_pair" in API. Bug fixes.
3434
* 1.0.0 2/27/2025. First beta release.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pySubnetSB"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
description = "Python Subnet Discovery for Systems Biology"
55
authors = [{ name = "Joseph Hellerstein", email = "joseph.hellerstein@gmail.com" }]
66
license = { file = "LICENSE" }

src/pySubnetSB/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
A Network is a representation of a chemical reaction network that includes a NamedMatrix for reactants and products.
66
A Constraint describes numerical or categorical charateristics of a network that are organized as one or more NamedMatrix.
77
"""
8-
__version__ = "1.0.4"
8+
__version__ = "1.0.5"

src/pySubnetSB/constraint_option_collection.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def __init__(self, **kwargs):
2020
"""
2121
self.__dict__.update(kwargs)
2222
self.option_names = list(kwargs.keys())
23-
self.long_to_short_dct = {n: self.short_names[i] for i, n in enumerate(self.option_names)}
23+
# short_names is defined in subclasses
24+
self.long_to_short_dct = {n: self.short_names[i] for i, n in enumerate(self.option_names)} # type: ignore
2425
self.short_to_long_dct = {v: k for k, v in self.long_to_short_dct.items()}
2526
self.num_option = len(self.option_names)
2627

@@ -42,7 +43,7 @@ def __eq__(self, other)->bool:
4243
def __repr__(self)->str:
4344
return str(self.__class__) + ": " + ', '.join(self.getTrueNames())
4445

45-
def getTrueNames(self)->list[str]:
46+
def getTrueNames(self)->List[str]:
4647
results:list = []
4748
for i, key in enumerate(self.option_names):
4849
if self.__dict__[key]:
@@ -122,7 +123,7 @@ def iterator(self):
122123
Iteratively returns an OptionCollection of the same type with all combinations of
123124
values for the boolean attributes.
124125
"""
125-
name_collections = util.getAllSubsets(self.short_names)
126+
name_collections = util.getAllSubsets(self.short_names) # type: ignore
126127
for name_collection in name_collections:
127128
yield self.makeOptionFromShortNames(name_collection)
128129

src/pySubnetSB/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ class StructuralAnalysisResult(object):
2323
# Auxiliary object returned by isStructurallyIdentical
2424

2525
def __init__(self,
26-
assignment_pairs:list[AssignmentPair],
26+
assignment_pairs:List[AssignmentPair],
2727
is_truncated:Optional[bool]=False,
2828
num_species_candidate:int=-1,
2929
num_reaction_candidate:int=-1,
3030
network:Optional['Network']=None,
3131
)->None:
3232
"""
3333
Args:
34-
assignment_pairs (list[AssignmentPair]): List of assignment pairs.
34+
assignment_pairs (List[AssignmentPair]): List of assignment pairs.
3535
is_trucnated (bool): True if the number of assignments exceeds the maximum number of assignments.
3636
num_species_candidate (int): Number of species candidates assignments
3737
num_reaction_candidate (int): Number of reaction candidates assignments.

0 commit comments

Comments
 (0)