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

Improve CSS query with getter and setter, keep order of css entries #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

doctormo
Copy link

I needed to do some svg work and svg has /a lot/ of embedded css. So I needed to upgrade pyquery to support the full jquery css command. I've made it work just like the js version with regards to how it returns getter values as well as getting lists and setting.

I also managed to reduce the code duplication between setting one item and setting a dictionary.

Tests to cover the function included.

@gawel
Copy link
Owner

gawel commented Jun 10, 2015

That's a good point. But your patch break all the tests

@doctormo
Copy link
Author

Does the module target python 2.6, because OrderedDict is >2.7 only. I think the rst tests are failing because of the added semi-colon at the end. And the local tests (setup.py test has no tests in it) tests.py all pass. Which means this project has multiple testing frameworks in place. How are these documentation tests run locally?

@gawel
Copy link
Owner

gawel commented Jun 10, 2015

It use tox. Like most projects. Just pip install tox and run tox.
I think python2.6 support can be dropped at this point. Just remove it from tox.ini / classifiers

@@ -12,6 +12,7 @@
import types
import sys

from collections import OrderedDict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Python 3.7: Dictionary order for all dicts is guaranteed to be insertion order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants