这是indexloc提供的服务,不要输入任何密码
Skip to content

code format and update function signatures #213

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

Merged
merged 3 commits into from
Sep 12, 2020
Merged

code format and update function signatures #213

merged 3 commits into from
Sep 12, 2020

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Sep 12, 2020

Cherry-pick from #200

  • update the function signature
  • format code-style
  • move _compile into separate functions
  • fix a bug in to_torch and to_numpy (Batch)
  • remove None in action_range

In short, the code-format only contains function-signature style and ' -> ". (pick up from black)

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2020

Codecov Report

Merging #213 into master will increase coverage by 0.05%.
The diff coverage is 96.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   94.10%   94.16%   +0.05%     
==========================================
  Files          39       38       -1     
  Lines        2443     2450       +7     
==========================================
+ Hits         2299     2307       +8     
+ Misses        144      143       -1     
Flag Coverage Δ
#unittests 94.16% <96.14%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tianshou/env/__init__.py 100.00% <ø> (ø)
tianshou/env/worker/__init__.py 100.00% <ø> (ø)
tianshou/exploration/__init__.py 100.00% <ø> (ø)
tianshou/policy/__init__.py 100.00% <ø> (ø)
tianshou/trainer/__init__.py 100.00% <ø> (ø)
tianshou/utils/config.py 100.00% <ø> (ø)
tianshou/policy/base.py 75.53% <80.00%> (+2.59%) ⬆️
tianshou/env/worker/dummy.py 91.30% <83.33%> (ø)
tianshou/policy/modelfree/sac.py 86.73% <85.71%> (+0.13%) ⬆️
tianshou/env/worker/ray.py 85.29% <87.50%> (+2.43%) ⬆️
... and 28 more

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 16d8e9b...1c7c088. Read the comment docs.

@Trinkle23897 Trinkle23897 changed the title code format and change function signature code format and update function signatures Sep 12, 2020
duburcqa
duburcqa previously approved these changes Sep 12, 2020
Copy link
Collaborator

@duburcqa duburcqa left a comment

Choose a reason for hiding this comment

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

Not much to say about this PR in practice it changes nothing, but I can see that I don't like much the new formatting style x)

@Trinkle23897 Trinkle23897 merged commit c91def6 into thu-ml:master Sep 12, 2020
@Trinkle23897 Trinkle23897 deleted the format branch September 12, 2020 07:39
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
Cherry-pick from thu-ml#200 

- update the function signature
- format code-style
- move _compile into separate functions
- fix a bug in to_torch and to_numpy (Batch)
- remove None in action_range

In short, the code-format only contains function-signature style and `'` -> `"`. (pick up from [black](https://github.com/psf/black))
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