- 
                Notifications
    
You must be signed in to change notification settings  - Fork 551
 
Fix for Click 8.2 breaking change #4061
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
          
     Open
      
      
            strickvl
  wants to merge
  28
  commits into
  feature/update-modal-step-operator
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
feature/handle-click-cli-ci-failures
  
      
      
   
  
    
  
  
  
 
  
      
    base: feature/update-modal-step-operator
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            28 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      ae4f71f
              
                Try fix for click 8.2 issue
              
              
                strickvl d28f68b
              
                Fix typo
              
              
                strickvl 5d07137
              
                Fixes for CI
              
              
                strickvl 5ce39d5
              
                mypy fix
              
              
                strickvl 7476168
              
                Darglint fixes
              
              
                strickvl db1907a
              
                Fix type hint for term_len in formatter.py
              
              
                strickvl e891353
              
                Merge branch 'feature/update-modal-step-operator' into feature/handle…
              
              
                strickvl ad309a8
              
                Fix CLI test failures with Click >=8.2 by using compatibility helper
              
              
                strickvl 515610f
              
                Document CLI testing best practices for Click compatibility
              
              
                strickvl 37ba025
              
                Add --test flag to init command tests to bypass email prompt
              
              
                strickvl e331ce8
              
                Improve exception handling and type hints in CLI formatter
              
              
                strickvl 92baa4d
              
                Fix clean command test to properly use boolean flag
              
              
                strickvl 5fae563
              
                Remove unused type: ignore comment in CLI formatter
              
              
                strickvl 65abb21
              
                Add missing init file
              
              
                strickvl 0ba7fdf
              
                Formatting
              
              
                strickvl 8cca137
              
                Fix test failures by renaming utils test directory
              
              
                strickvl be76ce5
              
                Fix test collection failures in test_step_context
              
              
                strickvl 60f14ae
              
                Fix failing windows DB lock in integration tests
              
              
                strickvl 6dd8121
              
                Remove duplicated close method
              
              
                strickvl de20aff
              
                Define the close method on the ZenStoreInterface
              
              
                strickvl 37dd260
              
                Improve comment clarity on Click 8.2+ help behavior
              
              
                strickvl ff10561
              
                Remove unnecessary formatter fallback branch
              
              
                strickvl d9e6158
              
                .gitignore updates
              
              
                strickvl aac47c2
              
                Simplify Click 8.2+ fix by reverting unnecessary formatter changes
              
              
                strickvl 9b2b3bf
              
                Restore type ignore comment for write_dl call
              
              
                strickvl f89bb14
              
                Fix test_reusing_private_secret_name_succeeds on REST stores
              
              
                strickvl 85cc697
              
                Merge branch 'feature/update-modal-step-operator' into feature/handle…
              
              
                strickvl f81886f
              
                Merge branch 'feature/update-modal-step-operator' into feature/handle…
              
              
                strickvl File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I really get why this is necessary. Why wouldn't click display the help anymore in newer versions with our previous setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue isn't that Click won't display help in newer versions (it will). The problem is that Click 8.2+ would display help using its default formatter instead of our custom
ZenMLCLI.get_help()formatter.(As far as I understand it, without
invoke_without_command=True, Click defaults tono_args_is_help=True. In Click 8.2+, this causes Click to raiseNoArgsIsHelpErrorbefore ourcli()callback runs, meaning it handles the help display internally with its default formatter, completely bypassing our custom formatting (categories, rich colors, custom layout). By usinginvoke_without_command=Trueand manually checking for no subcommand in the callback, we ensure our custom formatter is always used across all Click versions.)I will improve the comment to make it clearer maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just that I can't reproduce it. I have click 8.2+, I run
zenmlorzenml --help, and everything shows up correct (on develop). So it uses the correct formatter I assume?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if the code that defined
invoke_without_command=Truegets executed, at that point anyway I should also know about our custom class and use that context/formatter I assume?