Cleanup: spelling in comments, remove annotations that aren't validated

This commit is contained in:
Campbell Barton
2023-04-30 13:07:22 +10:00
parent 5c1c45cd59
commit 1c026befca
3 changed files with 12 additions and 10 deletions

View File

@@ -157,7 +157,7 @@ def _get_context_attr(context, data_path):
return context.path_resolve(data_path)
def _set_context_attr(context, data_path, value) -> None:
def _set_context_attr(context, data_path, value):
"""Set the value of a context member based on its data path."""
owner_path, attr_name = data_path.rsplit('.', 1)
owner = context.path_resolve(owner_path)
@@ -172,10 +172,10 @@ class GenericUIListOperator:
list_path: StringProperty()
active_index_path: StringProperty()
def get_list(self, context) -> str:
def get_list(self, context):
return _get_context_attr(context, self.list_path)
def get_active_index(self, context) -> str:
def get_active_index(self, context):
return _get_context_attr(context, self.active_index_path)
def set_active_index(self, context, index):
@@ -226,9 +226,11 @@ class UILIST_OT_entry_move(GenericUIListOperator, Operator):
direction: EnumProperty(
name="Direction",
items=(('UP', 'UP', 'UP'),
('DOWN', 'DOWN', 'DOWN')),
default='UP'
items=(
('UP', 'UP', 'UP'),
('DOWN', 'DOWN', 'DOWN'),
),
default='UP',
)
def execute(self, context):

View File

@@ -142,7 +142,7 @@ class BitSpan {
};
/**
* Checks if the span fullfills the requirements for a bounded span. Bounded spans can often be
* Checks if the span fulfills the requirements for a bounded span. Bounded spans can often be
* processed more efficiently, because fewer cases have to be considered when aligning multiple
* such spans.
*
@@ -170,7 +170,7 @@ inline bool is_bounded_span(const BitSpan span)
}
/**
* Same as #BitSpan but fullfills the requirements mentioned on #is_bounded_span.
* Same as #BitSpan but fulfills the requirements mentioned on #is_bounded_span.
*/
class BoundedBitSpan : public BitSpan {
public:
@@ -315,7 +315,7 @@ class MutableBitSpan {
};
/**
* Same as #MutableBitSpan but fullfills the requirements mentioned on #is_bounded_span.
* Same as #MutableBitSpan but fulfills the requirements mentioned on #is_bounded_span.
*/
class MutableBoundedBitSpan : public MutableBitSpan {
public:

View File

@@ -66,7 +66,7 @@ class ImplicitSharingInfo : NonCopyable, NonMovable {
BLI_assert(weak_users_ == 0);
}
/** Whether the resource can be modified inplace because there is only one owner. */
/** Whether the resource can be modified in place because there is only one owner. */
bool is_mutable() const
{
return strong_users_.load(std::memory_order_relaxed) == 1;