Skip to content

Commit

Permalink
prevent error on breaking change from newer pydantic version
Browse files Browse the repository at this point in the history
  • Loading branch information
cguardia committed Oct 28, 2020
1 parent 53de931 commit 665ffd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions questions/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def download_surveyjs(path, platform, theme):
widgets_js = set()
widgets_css = set()
for question in QUESTION_TYPES:
extra_js = question.__field_defaults__.get("extra_js", [])
extra_js = question.__fields__.get("extra_js").get_default()
widgets_js.update(extra_js)
extra_css = question.__field_defaults__.get("extra_css", [])
extra_css = question.__fields__.get("extra_css").get_default()
widgets_css.update(extra_css)
for url in js + css + list(widgets_js) + list(widgets_css):
resource = requests.get(url, allow_redirects=True)
Expand Down Expand Up @@ -75,7 +75,7 @@ def list_resources(platform, theme, include_widgets):
click.echo()
click.echo("Widget specific Javascript resources:")
for question in QUESTION_TYPES:
extra_js = question.__field_defaults__.get("extra_js", [])
extra_js = question.__fields__.get("extra_js").get_default()
if extra_js:
click.echo()
click.echo(f"{question.__name__}:")
Expand All @@ -90,7 +90,7 @@ def list_resources(platform, theme, include_widgets):
click.echo()
click.echo("Widget specific CSS resources:")
for question in QUESTION_TYPES:
extra_css = question.__field_defaults__.get("extra_css", [])
extra_css = question.__fields__.get("extra_css").get_default()
if extra_css:
click.echo()
click.echo(f"{question.__name__}:")
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ exclude = docs
[aliases]
# Define setup.py command aliases here
test = pytest

[tool:pytest]
collect_ignore = ['setup.py']

0 comments on commit 665ffd3

Please sign in to comment.