Skip to content

Commit

Permalink
🐛FIX TypeError: argument of type 'type' is not iterable
Browse files Browse the repository at this point in the history
closed #3
  • Loading branch information
simkimsia committed Jun 12, 2022
1 parent a966ae1 commit 3609a75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ I expect to upgrade this customer project to 3.2 Django in the near future as we
Referencing [Adam Johnson](http://twitter.com/adamchainz)'s [Well Maintained Test for dependencies](https://adamj.eu/tech/2021/11/04/the-well-maintained-test/), [question 11](https://adamj.eu/tech/2021/11/04/the-well-maintained-test/#has-there-been-a-commit-in-the-last-year) and [12](https://adamj.eu/tech/2021/11/04/the-well-maintained-test/#has-there-been-a-release-in-the-last-year), I quote

> 11. Has there been a commit in the last year?
>
> Maintainers tend to abandon packages rather than explicitly mark them as unmaintained. So the probability of future maintenance drops off the longer a project has not seen a commit.
>
> We’d like to see at least one recent commit as a “sign of life”.
>
> Any cutoff is arbitrary, but a year aligns with most programming languages’ annual release cadence.
>
> 12. Has there been a release in the last year?
>
> A backlog of unreleased commits can also be a sign of inattention. Active maintainers may have permission to merge but not release, with the true “owner” of the project absent.
As of 10 June 2022, both answers are close to being no given it's been nearly 10 months since the most recent release and commit in August 2021.
Expand Down
6 changes: 3 additions & 3 deletions django_ltree/fields.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from collections import UserList
from collections.abc import Iterable

from django import forms
from django.core.validators import RegexValidator
from django.db.models.fields import TextField
from django.forms.widgets import TextInput

from collections.abc import Iterable


class PathValue(UserList):
def __init__(self, value):
if isinstance(value, str):
split_by = "/" if "/" in str else "."
split_by = "/" if "/" in value else "."
value = value.strip().split(split_by) if value else []
elif isinstance(value, int):
value = [str(value)]
Expand Down

0 comments on commit 3609a75

Please sign in to comment.