diff --git a/poetry.lock b/poetry.lock index 8372f4d5..4afcce2c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -267,27 +267,30 @@ pytkdocs = ">=0.2.0,<0.12.0" [[package]] name = "mypy" -version = "0.812" +version = "1.0.0" description = "Optional static typing for Python" category = "main" optional = true -python-versions = ">=3.5" +python-versions = ">=3.7" [package.dependencies] -mypy-extensions = ">=0.4.3,<0.5.0" -typed-ast = ">=1.4.0,<1.5.0" -typing-extensions = ">=3.7.4" +mypy-extensions = ">=0.4.3" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = ">=3.10" [package.extras] dmypy = ["psutil (>=4.0)"] +install-types = ["pip"] +python2 = ["typed-ast (>=1.4.0,<2)"] +reports = ["lxml"] [[package]] name = "mypy-extensions" -version = "0.4.4" -description = "Experimental type system extensions for programs checked with the mypy typechecker." +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." category = "main" optional = true -python-versions = ">=2.7" +python-versions = ">=3.5" [[package]] name = "nanoid" @@ -533,14 +536,6 @@ category = "main" optional = true python-versions = ">=3.7" -[[package]] -name = "typed-ast" -version = "1.4.3" -description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "main" -optional = true -python-versions = "*" - [[package]] name = "typing-extensions" version = "4.5.0" @@ -590,7 +585,7 @@ linting = ["black", "flake8", "mypy"] [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "f785e7b02acf01c43347ba82b032b9fb5504752a1e6decb58c0dfea95a9cb00b" +content-hash = "aa9c0440f65f4b3ac2f56f39e586442e2e54098a702b1087630a0831a03d5a78" [metadata.files] astunparse = [ @@ -797,31 +792,36 @@ mkdocstrings = [ {file = "mkdocstrings-0.15.2.tar.gz", hash = "sha256:c2fee9a3a644647c06eb2044fdfede1073adfd1a55bf6752005d3db10705fe73"}, ] mypy = [ - {file = "mypy-0.812-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a26f8ec704e5a7423c8824d425086705e381b4f1dfdef6e3a1edab7ba174ec49"}, - {file = "mypy-0.812-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:28fb5479c494b1bab244620685e2eb3c3f988d71fd5d64cc753195e8ed53df7c"}, - {file = "mypy-0.812-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:9743c91088d396c1a5a3c9978354b61b0382b4e3c440ce83cf77994a43e8c521"}, - {file = "mypy-0.812-cp35-cp35m-win_amd64.whl", hash = "sha256:d7da2e1d5f558c37d6e8c1246f1aec1e7349e4913d8fb3cb289a35de573fe2eb"}, - {file = "mypy-0.812-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4eec37370483331d13514c3f55f446fc5248d6373e7029a29ecb7b7494851e7a"}, - {file = "mypy-0.812-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d65cc1df038ef55a99e617431f0553cd77763869eebdf9042403e16089fe746c"}, - {file = "mypy-0.812-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:61a3d5b97955422964be6b3baf05ff2ce7f26f52c85dd88db11d5e03e146a3a6"}, - {file = "mypy-0.812-cp36-cp36m-win_amd64.whl", hash = "sha256:25adde9b862f8f9aac9d2d11971f226bd4c8fbaa89fb76bdadb267ef22d10064"}, - {file = "mypy-0.812-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:552a815579aa1e995f39fd05dde6cd378e191b063f031f2acfe73ce9fb7f9e56"}, - {file = "mypy-0.812-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:499c798053cdebcaa916eef8cd733e5584b5909f789de856b482cd7d069bdad8"}, - {file = "mypy-0.812-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:5873888fff1c7cf5b71efbe80e0e73153fe9212fafdf8e44adfe4c20ec9f82d7"}, - {file = "mypy-0.812-cp37-cp37m-win_amd64.whl", hash = "sha256:9f94aac67a2045ec719ffe6111df543bac7874cee01f41928f6969756e030564"}, - {file = "mypy-0.812-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d23e0ea196702d918b60c8288561e722bf437d82cb7ef2edcd98cfa38905d506"}, - {file = "mypy-0.812-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:674e822aa665b9fd75130c6c5f5ed9564a38c6cea6a6432ce47eafb68ee578c5"}, - {file = "mypy-0.812-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:abf7e0c3cf117c44d9285cc6128856106183938c68fd4944763003decdcfeb66"}, - {file = "mypy-0.812-cp38-cp38-win_amd64.whl", hash = "sha256:0d0a87c0e7e3a9becdfbe936c981d32e5ee0ccda3e0f07e1ef2c3d1a817cf73e"}, - {file = "mypy-0.812-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7ce3175801d0ae5fdfa79b4f0cfed08807af4d075b402b7e294e6aa72af9aa2a"}, - {file = "mypy-0.812-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:b09669bcda124e83708f34a94606e01b614fa71931d356c1f1a5297ba11f110a"}, - {file = "mypy-0.812-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:33f159443db0829d16f0a8d83d94df3109bb6dd801975fe86bacb9bf71628e97"}, - {file = "mypy-0.812-cp39-cp39-win_amd64.whl", hash = "sha256:3f2aca7f68580dc2508289c729bd49ee929a436208d2b2b6aab15745a70a57df"}, - {file = "mypy-0.812-py3-none-any.whl", hash = "sha256:2f9b3407c58347a452fc0736861593e105139b905cca7d097e413453a1d650b4"}, - {file = "mypy-0.812.tar.gz", hash = "sha256:cd07039aa5df222037005b08fbbfd69b3ab0b0bd7a07d7906de75ae52c4e3119"}, + {file = "mypy-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0626db16705ab9f7fa6c249c017c887baf20738ce7f9129da162bb3075fc1af"}, + {file = "mypy-1.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1ace23f6bb4aec4604b86c4843276e8fa548d667dbbd0cb83a3ae14b18b2db6c"}, + {file = "mypy-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87edfaf344c9401942883fad030909116aa77b0fa7e6e8e1c5407e14549afe9a"}, + {file = "mypy-1.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0ab090d9240d6b4e99e1fa998c2d0aa5b29fc0fb06bd30e7ad6183c95fa07593"}, + {file = "mypy-1.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:7cc2c01dfc5a3cbddfa6c13f530ef3b95292f926329929001d45e124342cd6b7"}, + {file = "mypy-1.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:14d776869a3e6c89c17eb943100f7868f677703c8a4e00b3803918f86aafbc52"}, + {file = "mypy-1.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bb2782a036d9eb6b5a6efcdda0986774bf798beef86a62da86cb73e2a10b423d"}, + {file = "mypy-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cfca124f0ac6707747544c127880893ad72a656e136adc935c8600740b21ff5"}, + {file = "mypy-1.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8845125d0b7c57838a10fd8925b0f5f709d0e08568ce587cc862aacce453e3dd"}, + {file = "mypy-1.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b1b9e1ed40544ef486fa8ac022232ccc57109f379611633ede8e71630d07d2"}, + {file = "mypy-1.0.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c7cf862aef988b5fbaa17764ad1d21b4831436701c7d2b653156a9497d92c83c"}, + {file = "mypy-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cd187d92b6939617f1168a4fe68f68add749902c010e66fe574c165c742ed88"}, + {file = "mypy-1.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4e5175026618c178dfba6188228b845b64131034ab3ba52acaffa8f6c361f805"}, + {file = "mypy-1.0.0-cp37-cp37m-win_amd64.whl", hash = "sha256:2f6ac8c87e046dc18c7d1d7f6653a66787a4555085b056fe2d599f1f1a2a2d21"}, + {file = "mypy-1.0.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7306edca1c6f1b5fa0bc9aa645e6ac8393014fa82d0fa180d0ebc990ebe15964"}, + {file = "mypy-1.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3cfad08f16a9c6611e6143485a93de0e1e13f48cfb90bcad7d5fde1c0cec3d36"}, + {file = "mypy-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67cced7f15654710386e5c10b96608f1ee3d5c94ca1da5a2aad5889793a824c1"}, + {file = "mypy-1.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a86b794e8a56ada65c573183756eac8ac5b8d3d59daf9d5ebd72ecdbb7867a43"}, + {file = "mypy-1.0.0-cp38-cp38-win_amd64.whl", hash = "sha256:50979d5efff8d4135d9db293c6cb2c42260e70fb010cbc697b1311a4d7a39ddb"}, + {file = "mypy-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ae4c7a99e5153496243146a3baf33b9beff714464ca386b5f62daad601d87af"}, + {file = "mypy-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e398652d005a198a7f3c132426b33c6b85d98aa7dc852137a2a3be8890c4072"}, + {file = "mypy-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be78077064d016bc1b639c2cbcc5be945b47b4261a4f4b7d8923f6c69c5c9457"}, + {file = "mypy-1.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:92024447a339400ea00ac228369cd242e988dd775640755fa4ac0c126e49bb74"}, + {file = "mypy-1.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:fe523fcbd52c05040c7bee370d66fee8373c5972171e4fbc323153433198592d"}, + {file = "mypy-1.0.0-py3-none-any.whl", hash = "sha256:2efa963bdddb27cb4a0d42545cd137a8d2b883bd181bbc4525b568ef6eca258f"}, + {file = "mypy-1.0.0.tar.gz", hash = "sha256:f34495079c8d9da05b183f9f7daec2878280c2ad7cc81da686ef0b484cea2ecf"}, ] mypy-extensions = [ - {file = "mypy_extensions-0.4.4.tar.gz", hash = "sha256:c8b707883a96efe9b4bb3aaf0dcc07e7e217d7d8368eec4db4049ee9e142f4fd"}, + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] nanoid = [ {file = "nanoid-2.0.0-py3-none-any.whl", hash = "sha256:90aefa650e328cffb0893bbd4c236cfd44c48bc1f2d0b525ecc53c3187b653bb"}, @@ -979,38 +979,6 @@ tomli = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -typed-ast = [ - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, - {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, - {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, - {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, - {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, - {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, - {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, - {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, - {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, - {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, -] typing-extensions = [ {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, diff --git a/pyproject.toml b/pyproject.toml index 0ccfce32..9a56a416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ nanoid = "^2.0" numpy = "^1.23" black = {version = "^23.1.0", optional = true} flake8 = {version = "^3.8", optional = true} -mypy = {version = "^0.812", optional = true} +mypy = {version = "^1.0.0", optional = true} mkdocs = {version = "^1.1", optional = true} mkdocs-material = {version = "^7.0", optional = true} mkdocstrings = {version = "^0.15.0", optional = true} diff --git a/tests/conftest.py b/tests/conftest.py index 9f7d7ecb..8d8249cb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,6 +9,7 @@ from titan.agent import Agent, Relationship from titan.location import Location + # helper method to generate a fake number deterministically class FakeRandom: def __init__(self, num: float, fake_choice: int = 0): diff --git a/tests/exposures/knowledge_test.py b/tests/exposures/knowledge_test.py index 93f6eb11..6b262db2 100644 --- a/tests/exposures/knowledge_test.py +++ b/tests/exposures/knowledge_test.py @@ -89,7 +89,6 @@ def test_knowledge_influence(make_model, make_agent): @pytest.mark.unit def test_knowledge_exposure(make_model, make_agent, params): - # test update all agents for knowledge params.exposures.knowledge = True params.knowledge.prob = 0.0 diff --git a/tests/integration_test.py b/tests/integration_test.py index 760f65c8..eb37b43f 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -13,6 +13,7 @@ from titan.model import TITAN from titan.run_titan import script_init + # overwrite @pytest.fixture def params_integration(tmpdir): diff --git a/titan/exposures/base_exposure.py b/titan/exposures/base_exposure.py index c42db438..b0459951 100644 --- a/titan/exposures/base_exposure.py +++ b/titan/exposures/base_exposure.py @@ -6,7 +6,6 @@ class BaseExposure: - name: str = "" """Name of exposure in the params file. Also used to name the attribute in Agent""" diff --git a/titan/exposures/hiv.py b/titan/exposures/hiv.py index ce53de1e..84679790 100644 --- a/titan/exposures/hiv.py +++ b/titan/exposures/hiv.py @@ -8,7 +8,6 @@ class HIV(base_exposure.BaseExposure): - name: str = "hiv" stats: List[str] = ["hiv", "hiv_dx", "hiv_aids", "hiv_new", "hiv_dx_new"] """ diff --git a/titan/exposures/knowledge.py b/titan/exposures/knowledge.py index abc3a8a5..b464e517 100644 --- a/titan/exposures/knowledge.py +++ b/titan/exposures/knowledge.py @@ -11,7 +11,6 @@ class Knowledge(base_exposure.BaseExposure): - name: str = "knowledge" stats: List[str] = ["knowledge_aware"] """ diff --git a/titan/exposures/monkeypox.py b/titan/exposures/monkeypox.py index 230fd843..ae1d42ae 100644 --- a/titan/exposures/monkeypox.py +++ b/titan/exposures/monkeypox.py @@ -8,7 +8,6 @@ class MonkeyPox(base_exposure.BaseExposure): - name: str = "monkeypox" stats: List[str] = [ "monkeypox", diff --git a/titan/features/external_exposure.py b/titan/features/external_exposure.py index 3f3d24ec..b0bf0f27 100644 --- a/titan/features/external_exposure.py +++ b/titan/features/external_exposure.py @@ -5,7 +5,6 @@ class ExternalExposure(base_feature.BaseFeature): - name = "external_exposure" def __init__(self, agent: "agent.Agent"): diff --git a/titan/features/high_risk.py b/titan/features/high_risk.py index 7277904d..824b052b 100644 --- a/titan/features/high_risk.py +++ b/titan/features/high_risk.py @@ -11,7 +11,6 @@ class HighRisk(base_feature.BaseFeature): - name = "high_risk" stats = [ "high_risk_new", @@ -76,7 +75,6 @@ def update_agent(self, model: "model.TITAN"): # incarcerated last step, evaluate agent's partners for high risk elif self.agent.incar.time == model.time - 1: # type: ignore[attr-defined] - # put partners in high risk for partner in self.agent.get_partners( self.agent.location.params.high_risk.partnership_types diff --git a/titan/features/incar.py b/titan/features/incar.py index a4a6ee40..3f705956 100644 --- a/titan/features/incar.py +++ b/titan/features/incar.py @@ -8,7 +8,6 @@ class Incar(base_feature.BaseFeature): - name = "incar" stats = ["incar", "incar_hiv", "new_release", "new_release_hiv"] """ diff --git a/titan/features/partner_tracing.py b/titan/features/partner_tracing.py index 5194d3f0..2f1ac74e 100644 --- a/titan/features/partner_tracing.py +++ b/titan/features/partner_tracing.py @@ -4,7 +4,6 @@ class PartnerTracing(base_feature.BaseFeature): - name = "partner_tracing" def __init__(self, agent: "agent.Agent"): diff --git a/titan/features/prep.py b/titan/features/prep.py index 6ff569c7..b4ba8574 100644 --- a/titan/features/prep.py +++ b/titan/features/prep.py @@ -11,7 +11,6 @@ class Prep(base_feature.BaseFeature): - name = "prep" stats = ["prep", "prep_new", "prep_injectable", "prep_oral"] """ diff --git a/titan/features/random_trial.py b/titan/features/random_trial.py index 7928f10e..707560ff 100644 --- a/titan/features/random_trial.py +++ b/titan/features/random_trial.py @@ -9,7 +9,6 @@ class RandomTrial(base_feature.BaseFeature): - name = "random_trial" stats = [ "random_trial", diff --git a/titan/features/syringe_services.py b/titan/features/syringe_services.py index 89ca25ea..fda212fe 100644 --- a/titan/features/syringe_services.py +++ b/titan/features/syringe_services.py @@ -6,7 +6,6 @@ class SyringeServices(base_feature.BaseFeature): - name = "syringe_services" enrolled_risk = 0.0 diff --git a/titan/features/vaccine.py b/titan/features/vaccine.py index 0a41c6a3..b880ce15 100644 --- a/titan/features/vaccine.py +++ b/titan/features/vaccine.py @@ -9,7 +9,6 @@ class Vaccine(base_feature.BaseFeature): - name = "vaccine" stats = ["vaccine"] """ diff --git a/titan/interactions/base_interaction.py b/titan/interactions/base_interaction.py index 23d14c65..ca01dda5 100644 --- a/titan/interactions/base_interaction.py +++ b/titan/interactions/base_interaction.py @@ -3,7 +3,6 @@ class BaseInteraction: - name: str = "" """Name of interaction in the params file.""" diff --git a/titan/interactions/injection.py b/titan/interactions/injection.py index 909ae7a5..c3ba5fd9 100644 --- a/titan/interactions/injection.py +++ b/titan/interactions/injection.py @@ -6,7 +6,6 @@ class Injection(base_interaction.BaseInteraction): - name = "injection" @classmethod diff --git a/titan/interactions/pca.py b/titan/interactions/pca.py index 908784d7..f4a5301e 100644 --- a/titan/interactions/pca.py +++ b/titan/interactions/pca.py @@ -5,7 +5,6 @@ class PCA(base_interaction.BaseInteraction): - name = "pca" @classmethod diff --git a/titan/interactions/sex.py b/titan/interactions/sex.py index dc0a25f8..edc76c95 100644 --- a/titan/interactions/sex.py +++ b/titan/interactions/sex.py @@ -5,7 +5,6 @@ class Sex(base_interaction.BaseInteraction): - name = "sex" @classmethod diff --git a/titan/location.py b/titan/location.py index 9f6fdbae..89d50837 100644 --- a/titan/location.py +++ b/titan/location.py @@ -129,7 +129,6 @@ def add_weight(d, v, w): # * how will mobility be implemented? # * assorting? class LocationEdge: - next_edge_id = 0 @classmethod diff --git a/titan/output.py b/titan/output.py index 15f876a9..0c7e9ed4 100644 --- a/titan/output.py +++ b/titan/output.py @@ -301,7 +301,7 @@ def print_components( "\tdensity\tEffectiveSize\tdeg_cent\n" ) - for (id, comp) in enumerate(components): + for id, comp in enumerate(components): num_nodes = comp.number_of_nodes() average_size = effective_size(comp) / num_nodes diff --git a/titan/population.py b/titan/population.py index b0cbeed0..8845fa31 100644 --- a/titan/population.py +++ b/titan/population.py @@ -411,7 +411,6 @@ def update_partner_assignments(self, t: int): while eligible_agents: agent = eligible_agents.popleft() if len(agent.partners[bond]) < agent.target_partners[bond]: - # no match if self.update_agent_partners(agent, bond, network_components): attempts[agent] += 1 diff --git a/titan/utils.py b/titan/utils.py index fc35d929..757efdf5 100644 --- a/titan/utils.py +++ b/titan/utils.py @@ -391,7 +391,7 @@ def grid_file_to_edges(file_path: str, diagonal_neighbors: bool = False) -> Dict add_edge(edges, loc, grid[i + 1][j - 1]) res = {} - for (i, edge) in enumerate(edges): + for i, edge in enumerate(edges): res[f"edge_{i+1}"] = {"location_1": edge[0], "location_2": edge[1]} return res