File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
settings-library/src/settings_library
simcore-sdk/src/simcore_sdk/node_ports_v2 Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class PostgresSettings(BaseCustomSettings):
4949 @field_validator ("POSTGRES_MAXSIZE" )
5050 @classmethod
5151 def _check_size (cls , v , info : ValidationInfo ):
52- if not ( info .data ["POSTGRES_MINSIZE" ] <= v ) :
52+ if info .data ["POSTGRES_MINSIZE" ] > v :
5353 msg = f"assert POSTGRES_MINSIZE={ info .data ['POSTGRES_MINSIZE' ]} <= POSTGRES_MAXSIZE={ v } "
5454 raise ValueError (msg )
5555 return v
Original file line number Diff line number Diff line change @@ -60,9 +60,8 @@ def print_as_envfile(
6060 elif show_secrets and hasattr (value , "get_secret_value" ):
6161 value = value .get_secret_value ()
6262
63- if verbose :
64- if field .description :
65- typer .echo (f"# { field .description } " )
63+ if verbose and field .description :
64+ typer .echo (f"# { field .description } " )
6665
6766 typer .echo (f"{ name } ={ value } " )
6867
Original file line number Diff line number Diff line change 99
1010class BasePortsMapping (RootModel [dict [ServicePortKey , Port ]]):
1111 def __getitem__ (self , key : int | ServicePortKey ) -> Port :
12- if isinstance (key , int ):
13- if key < len (self .root ):
14- key = list (self .root .keys ())[key ]
12+ if isinstance (key , int ) and key < len (self .root ):
13+ key = list (self .root .keys ())[key ]
1514 if key not in self .root :
1615 raise UnboundPortError (key )
1716 assert isinstance (key , str ) # nosec
You can’t perform that action at this time.
0 commit comments