Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist/
.cache/
.mypy_cache/
.pytest_cache/
.ruff_cache/
.tox/
__pycache__/
*.pyc
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 4.0.0

* add counties, thanks to [Ray Kiddy](https://github.com/rkiddy)
* add `ASSOCIATED_STATES` list with entries for Marshall Islands, Federated States of Micronesia, and Palau, plus a new `is_associated` attribute on `State`
* add `clean_name()` method and `fallback_func` parameter to `lookup()` to provide customizable matching, thanks to [Max Filenko](https://github.com/mfilenko) and [Charlie Tonneslan](https://github.com/c-tonneslan)
* DC has returned to `STATES_AND_TERRITORIES`, thanks to [Kavi Gupta](https://github.com/kavigupta)
* change ND time zone from America/Boise to America/Denver
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,17 @@ Some states like to be fancy and call themselves commonwealths:
[<State:Kentucky>, <State:Massachusetts>, <State:Pennsylvania>, <State:Virginia>]
```

There's also a list of obsolete territories:
There's a list of associated states, sovereign nations in free association with
the United States under the Compact of Free Association. They are not US
states or territories and are not included in `STATES_AND_TERRITORIES` or
returned by `lookup()`:

```python
>>> us.states.ASSOCIATED_STATES
[<State:Federated States of Micronesia>, <State:Marshall Islands>, <State:Palau>]
```

And a list of obsolete territories:

```python
>>> us.states.OBSOLETE
Expand Down
2 changes: 2 additions & 0 deletions us/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
TERRITORIES,
STATES_AND_TERRITORIES,
OBSOLETE,
ASSOCIATED_STATES,
)
from .unitedstatesofamerica import name, abbr, birthday

Expand Down Expand Up @@ -33,6 +34,7 @@ def __getattr__(name):
"TERRITORIES",
"STATES_AND_TERRITORIES",
"OBSOLETE",
"ASSOCIATED_STATES",
"name",
"abbr",
"birthday",
Expand Down
Loading