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 pdm show specific package with werid output #580

Conversation

linw1995
Copy link
Member

@linw1995 linw1995 commented Aug 4, 2021

Pull Request Check List

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

Run the command pdm show xxx to print specific package info. It got weird output instead.

Run pdm show pdm

❯ pdm show pdm
Name:                  pdm                                                                                  
Latest version:        1.7.2                                                                                
Latest stable version: 1.7.2                                                                                
Installed version:     1.7.3.dev22+g29b6e62.d20210804                                                       
Summary:               Python Development Master                                                            
Author:                                                                                                     
Author email:          frostming <[email protected]>                                                      
License:               MIT                                                                                  
Homepage:                                                                                                   
Project URLs:          D                                                                                    
                       o                                                                                    
                       c                                                                                    
                       u                                                                                    
                       m                                                                                    
                       e                                                                                    
                       n                                                                                    
                       t                                                                                    
                       a                                                                                    
                       t                                                                                    
                       i                                                                                    
                       o                                                                                    
                       n                                                                                    
                       ,                                                                                    
                                                                                                            
                       h                                                                                    
                       t                                                                                    
                       t                                                                                    
                       p                                                                                    
                       s                                                                                    
                       :                                                                                    
                       /                                                                                    
                       /                                                                                    
                       p                                                                                    
                       d                                                                                    
                       m                                                                                    
                       .                                                                                    
                       f                                                                                    
                       m                                                                                    
                       i                                                                                    
                       n                                                                                    
                       g                                                                                    
                       .                                                                                    
                       d                                                                                    
                       e                                                                                    
                       v                                                                                    
Platform:                                                                                                   
Keywords:              p, a, c, k, a, g, i, n, g, ,, d, e, p, e, n, d, e, n, c, y, ,, w, o, r, k, f, l, o, w

Or run pdm show colorama

Name:                  colorama                                                                                                                                                                                   
Latest version:        0.4.4                                                                                                                                                                                      
Latest stable version: 0.4.4                                                                                                                                                                                      
Summary:               Cross-platform colored terminal text.                                                                                                                                                      
Author:                Jonathan Hartley                                                                                                                                                                           
Author email:          [email protected]                                                                                                                                                                        
License:               BSD                                                                                                                                                                                        
Homepage:              https://github.com/tartley/colorama                                                                                                                                                        
Project URLs:                                                                                                                                                                                                     
Platform:              U, N, K, N, O, W, N                                                                                                                                                                        
Keywords:              c, o, l, o, r,  , c, o, l, o, u, r,  , t, e, r, m, i, n, a, l,  , t, e, x, t,  , a, n, s, i,  , w, i, n, d, o, w, s,  , c, r, o, s, s, p, l, a, t, f, o, r, m,  , x, p, l, a, t, f, o, r, m

This PR resolves all the above issues.

@linw1995 linw1995 added the 🐛 bug Something isn't working label Aug 4, 2021
@linw1995 linw1995 self-assigned this Aug 4, 2021


def get_as_dot_list(metadata: DistributionMetadata, key: str) -> List[str]:
return metadata.get(key, "").split(",")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this function necessary? It does the same as keywords = metadata.get("keywords", "").replace(",", ", "), or just don't replace, use it as is.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2021

Codecov Report

Merging #580 (8967ecd) into main (29b6e62) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #580   +/-   ##
=======================================
  Coverage   84.05%   84.06%           
=======================================
  Files          68       68           
  Lines        5563     5566    +3     
  Branches      980      981    +1     
=======================================
+ Hits         4676     4679    +3     
  Misses        614      614           
  Partials      273      273           
Flag Coverage Δ
unittests 83.92% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
pdm/models/project_info.py 95.12% <100.00%> (+0.38%) ⬆️

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 29b6e62...8967ecd. Read the comment docs.

Copy link
Collaborator

@frostming frostming left a comment

Choose a reason for hiding this comment

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

LGTM

@frostming frostming merged commit abd372c into pdm-project:main Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants