Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix track filtering #232

Merged
merged 3 commits into from Mar 10, 2020
Merged

Fix track filtering #232

merged 3 commits into from Mar 10, 2020

Conversation

@jjok
Copy link
Contributor

jjok commented Mar 1, 2020

Fixes #231

I guess these are things that changed with Python 3.

The filter() function now returns a filter object, rather than a list, so it has to be converted to a list before it can be filtered again in the loop.

It seems that a string is iterable, so we need to differentiate between a list and a string, we need to specifically check is values is a list, not just if it is iterable.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 1, 2020

Codecov Report

Merging #232 into master will not change coverage.
The diff coverage is 22.22%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #232   +/-   ##
=======================================
  Coverage   59.92%   59.92%           
=======================================
  Files           9        9           
  Lines         751      751           
=======================================
  Hits          450      450           
  Misses        301      301
Impacted Files Coverage Δ
mopidy_gmusic/library.py 50.87% <22.22%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88e71a1...5bb2d66. Read the comment docs.

@jodal jodal added this to the v4.0.1 milestone Mar 1, 2020
@jodal
jodal approved these changes Mar 1, 2020
@jodal jodal requested a review from belak Mar 1, 2020
@belak
belak approved these changes Mar 8, 2020
@jjok

This comment has been minimized.

Copy link
Contributor Author

jjok commented Mar 10, 2020

black run-test: commands[0] | python -m black --check .
would reformat /home/circleci/project/mopidy_gmusic/library.py
Oh no! 💥 💔 💥
1 file would be reformatted, 18 files would be left unchanged.
ERROR: InvocationError for command /home/circleci/project/.tox/black/bin/python -m black --check . (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   black: commands failed

Exited with code exit status 1

@jodal Any idea why Black is failing? Is it some kind of linting that's failing? Or the actual command itself isn't running correctly?
If it's linting, it would be helpful to show what changes should be made, like Flake8 does.

@jodal

This comment has been minimized.

Copy link
Member

jodal commented Mar 10, 2020

Black does all the changes for you, if you just run black . locally.

@kingosticks

This comment has been minimized.

Copy link
Member

kingosticks commented Mar 10, 2020

It's telling you that one file in the codebase failed the formatting check. Just run the command black and it'll make the changes required to the file for you. (don't forget to commit them too)

@jodal jodal merged commit 3f378dd into mopidy:master Mar 10, 2020
2 of 3 checks passed
2 of 3 checks passed
codecov/patch 22.22% of diff hit (target 59.92%)
Details
codecov/project 59.92% remains the same compared to 88e71a1
Details
test Workflow: test
Details
@jodal

This comment has been minimized.

Copy link
Member

jodal commented Mar 10, 2020

Thanks :-)

@jjok jjok deleted the jjok:fix/231 branch Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.