artiq: reformat
This commit is contained in:
parent
2470ab7856
commit
459be94526
|
@ -304,7 +304,10 @@ impl InnerResolver {
|
|||
self.helper.id_fn.call1(py, (self.helper.type_fn.call1(py, (pyty,))?,))?.extract(py)?;
|
||||
let py_obj_id: u64 = self.helper.id_fn.call1(py, (pyty,))?.extract(py)?;
|
||||
let get_def_id = || {
|
||||
self.pyid_to_def.read().get(&ty_id).copied()
|
||||
self.pyid_to_def
|
||||
.read()
|
||||
.get(&ty_id)
|
||||
.copied()
|
||||
.or_else(|| self.pyid_to_def.read().get(&py_obj_id).copied())
|
||||
};
|
||||
if ty_id == self.primitive_ids.int || ty_id == self.primitive_ids.int32 {
|
||||
|
@ -608,10 +611,12 @@ impl InnerResolver {
|
|||
let constructor_ty = pyid_to_def.get(&py_obj_id).and_then(|def_id| {
|
||||
defs.iter().find_map(|def| {
|
||||
if let Some(rear_guard) = def.try_read() {
|
||||
if let TopLevelDef::Class {
|
||||
object_id, methods, constructor, ..
|
||||
} = &*rear_guard {
|
||||
if object_id == def_id && constructor.is_some() && methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
|
||||
if let TopLevelDef::Class { object_id, methods, constructor, .. } = &*rear_guard
|
||||
{
|
||||
if object_id == def_id
|
||||
&& constructor.is_some()
|
||||
&& methods.iter().any(|(s, _, _)| s == &"__init__".into())
|
||||
{
|
||||
return *constructor;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue