@@ -194,7 +194,11 @@ def test_insights_full(self) -> None:
194194 "Insights str representation looks reasonable" ,
195195 )
196196
197- self .assertEqual (model , eval (repr (model )), "Insights repr can be eval'd" )
197+ self .assertEqual (
198+ model ,
199+ eval (repr (model )), # noqa: S307
200+ "Insights repr can be eval'd" ,
201+ )
198202
199203 self .assertRegex (
200204 str (model .location ),
@@ -204,23 +208,29 @@ def test_insights_full(self) -> None:
204208
205209 self .assertEqual (
206210 model .location ,
207- eval (repr (model .location )),
211+ eval (repr (model .location )), # noqa: S307
208212 "Location repr can be eval'd" ,
209213 )
210214
211- self .assertIs (model .country .is_in_european_union , False )
212- self .assertIs (model .registered_country .is_in_european_union , False )
213- self .assertIs (model .represented_country .is_in_european_union , True )
215+ self .assertIs (model .country .is_in_european_union , False ) # noqa: FBT003
216+ self .assertIs (
217+ model .registered_country .is_in_european_union ,
218+ False , # noqa: FBT003
219+ )
220+ self .assertIs (
221+ model .represented_country .is_in_european_union ,
222+ True , # noqa: FBT003
223+ )
214224
215- self .assertIs (model .traits .is_anonymous , True )
216- self .assertIs (model .traits .is_anonymous_proxy , True )
217- self .assertIs (model .traits .is_anonymous_vpn , True )
218- self .assertIs (model .traits .is_anycast , True )
219- self .assertIs (model .traits .is_hosting_provider , True )
220- self .assertIs (model .traits .is_public_proxy , True )
221- self .assertIs (model .traits .is_residential_proxy , True )
222- self .assertIs (model .traits .is_satellite_provider , True )
223- self .assertIs (model .traits .is_tor_exit_node , True )
225+ self .assertIs (model .traits .is_anonymous , True ) # noqa: FBT003
226+ self .assertIs (model .traits .is_anonymous_proxy , True ) # noqa: FBT003
227+ self .assertIs (model .traits .is_anonymous_vpn , True ) # noqa: FBT003
228+ self .assertIs (model .traits .is_anycast , True ) # noqa: FBT003
229+ self .assertIs (model .traits .is_hosting_provider , True ) # noqa: FBT003
230+ self .assertIs (model .traits .is_public_proxy , True ) # noqa: FBT003
231+ self .assertIs (model .traits .is_residential_proxy , True ) # noqa: FBT003
232+ self .assertIs (model .traits .is_satellite_provider , True ) # noqa: FBT003
233+ self .assertIs (model .traits .is_tor_exit_node , True ) # noqa: FBT003
224234 self .assertEqual (model .traits .user_count , 2 )
225235 self .assertEqual (model .traits .static_ip_score , 1.3 )
226236
@@ -433,9 +443,9 @@ def test_unknown_keys(self) -> None:
433443 unk_base = {"blah" : 1 },
434444 )
435445 with self .assertRaises (AttributeError ):
436- model .unk_base # type: ignore
446+ model .unk_base # type: ignore[attr-defined] # noqa: B018
437447 with self .assertRaises (AttributeError ):
438- model .traits .invalid # type: ignore
448+ model .traits .invalid # type: ignore[attr-defined] # noqa: B018
439449 self .assertEqual (
440450 model .traits .ip_address ,
441451 ipaddress .ip_address ("1.2.3.4" ),
0 commit comments